<%-- 
    Document   : inquiry_main
    Created on : Dec 9, 2008, 9:24:12 AM
    Author     : hp02
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<h3>Inquiry</h3>
<table>
    <tr>
        <td class="menucon">
            <html:link action="/inquiry_presave.do">New Inquiry</html:link>
        </td>
        <td class="menucon">
            <html:link action="/inquiry_getcabang.do">Find by Branch Office</html:link>
        </td>
        <td class="menucon">
            <html:link action="/inquiry_getprojectandcabang.do">Find by Project &amp; Branch Office</html:link>
        </td>
        <td class="menucon">
            <html:link action="/inquiry_getproject.do">Find by Project</html:link>
        </td>
    </tr>
</table>
<html:messages id="messages" property="customMessage" message="true">
    <div><bean:write name="messages"/></div>
</html:messages>
<html:messages id="messages" property="message" message="true">
    <ul>
        <li><bean:write name="messages"/></li>
    </ul>
</html:messages>
<table>
    <tr class="table_header">
        <th>No.</th>
        <th>Quotation</th>
        <th>Created</th>
        <th>Project</th>
        <th>Sales</th>
        <th>Branch Office</th>
        <th>Actions</th>
    </tr>
    <c:set var="x" value="0"/>
    <c:forEach items="${inquiries}" var="inquiry">
        <tr>
            <td>${x+1}.</td>
            <td>
                <c:if test="${inquiry.quotation.noQuotation==null}">
                    ${inquiry.noQuotation}
                </c:if>
                <c:if test="${inquiry.quotation.noQuotation!=null}">
                    <html:link action="#">${inquiry.noQuotation}</html:link>
                </c:if>
            </td>
            <td><f:formatDate type="date" value="${inquiry.tanggal}"/></td>
            <td><html:link action="/project_getproject.do?id=${inquiry.project.id}">${inquiry.project.nama}</html:link></td>
            <td><html:link action="/usr_getuser.do?id=${inquiry.sales.id}">${inquiry.sales.nama}</html:link></td>
            <td><html:link action="#">${inquiry.cabang.kota}</html:link></td>
            <td>
                <html:link action="/inquiry_getinquiry.do?id=${inquiry.id}">Detail</html:link>
                <html:link action="/inquiry_preupdate.do?id=${inquiry.id}">Edit</html:link>
                <html:link action="/inquiry_delete.do?id=${inquiry.id}">Delete</html:link>
            </td>
        </tr>
        <c:set var="x" value="${x+1}"/>
    </c:forEach>
        <tr class="table_footer">
            <td colspan="10">PT. Dhemar Nusantara - PT. Rahmi Ida Nusantara</td>
        </tr>
</table>
